-
Notifications
You must be signed in to change notification settings - Fork 60
Add hierarchical qubit types #2369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
joeycarter
wants to merge
14
commits into
main
Choose a base branch
from
joeycarter/hierarchical-qubit-types
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+490
−22
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b76c045 to
8ce764f
Compare
Options are: - `!quantum.bit<abstract>` - `!quantum.bit<logical>` - `!quantum.bit<qec>` - `!quantum.bit<physical>` The default qubit type is still `!quantum.bit`, which is now equivalent to `!quantum.bit<abstract>`.
Also update verifier tests
The role parameter is restricted to QEC and physical qubits, and can be one of 'data', 'xcheck', 'zcheck' or 'null' (the default). For abstract and logical qubits, only the 'null' role is permitted.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context: Catalyst currently only supports a single, universal qubit type in its MLIR program representation:
!quantum.bit. In order to express FTQC workloads in the compiler, we require a more expressive type system to represent a program that is successively lowered from the user program to a hardware-agnostic QEC layer and to a hardware-specific error-corrected MBQC physical layer. We also anticipate that the definitions of these new types will simplify the implementation of a number of other components in the FTQC software stack, especially those that operate at multiple levels of qubit-type abstraction, such as a Pauli frame tracking system.Description of the Change: This change introduces the following qubit levels:
!quantum.bit<abstract>!quantum.bit<logical>!quantum.bit<qec>!quantum.bit<physical>The
abstractlevel is the default and is equivalent to!quantum.bit. In addition to the qubit level, the following qubit roles have been defined to specialize theqecandphysicalqubit types:null,data,xcheckandzcheck. These roles are represented in the IR as, for example:!quantum.bit<physical, null>!quantum.bit<physical, data>!quantum.bit<physical, xcheck>!quantum.bit<physical, zcheck>The
nullrole is the default for all levels and can be omitted. The purpose of the role parameter is to distinguish data qubits and syndrome qubits to extract X and Z corrections in CSS QEC codes by way of stabilizer measurements. As such, the IR restricts these role parameters to theqecandphysicalqubit types;abstractandlogicalqubits currently do not permit specifying a role other thannull.To allow for correct type parsing while continuing to use the custom assembly format that quantum operations use, all quantum ops that consume and return qubit values are now restricted to input and output qubits of the same type. This restrictions is accomplished by adding
AllTypesMatch<["in_qubit", "out_qubit"]>traits to the appropriate quantum operations. This restriction means that operations such asare permitted, but operations that mix types, such as
are not.
Benefits: More expressive IR for FTQC workloads; simplifies implementation of compilation passes that convert between levels of abstractions.
Possible Drawbacks: The details of the compilation passes that convert a program to the QEC and physical layers are still being established, therefore the requirements for these new qubit types may change as these future passes develop.
[sc-107427], [sc-107428], [sc-107429], [sc-107430], [sc-107433]